package f_collection;

import java.util.*;


public class HashSetEx {
	HashSet<StackData> hs = new HashSet<StackData>();
	public HashSetEx(){
		hs.add(new StackData("park1",11));
		hs.add(new StackData("park2",12));
		hs.add(new StackData("park3",13));
		hs.add(new StackData("park4",14));
		hs.add(new StackData("park1",11));
		hs.add(new StackData("park1",11));
		hs.add(new StackData("park1",11));
		hs.add(new StackData("park1",11));
		hs.add(new StackData("park1",11));
		
		Iterator<StackData> it1 = hs.iterator();
		StackData data = null;
		while(it1.hasNext()){
			data = it1.next();
			data.age *=10;
			System.out.println(String.format("%-10s %6d %30d", data.irum,data.age, data.hashCode()));
		}
		
	}
	
	public static void main(String[] args) {
		new HashSetEx();

	}

}
